package cn.hznc.controller.service;


import cn.hznc.configuration.FirstMqttGatewayConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MqttPublish {

    @Autowired
    private FirstMqttGatewayConfig mqttGateway;


    //请求单个设备Probe文件，程序启动请求并解析一次
    public synchronized void publish_single_device_probe(String machineID) {
        String topic = "Probe/Query/Request/" + machineID;
        this.mqttGateway.sendToMqtt("", topic);
    }

}
